<?php

class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
    	$message = $this->_helper->FlashMessenger->getMessages();
	    if($message){
	    	$this->view->message = $message[0];
	    }
		$this->view->title = 'Welcome';
    }
    
    public function successAction()
    {
    	if($this->_helper->getHelper('FlashMessenger')->getMessages()){
    		$this->view->messages = $this->_helper->getHelper('FlashMessenger')->getMessages();
    	}
    	else{
    		$this->_redirect('/');
    	}
    }
    public function failAction()
    {
    	if($this->_helper->getHelper('FlashMessenger')->getMessages()){
    		$this->view->messages = $this->_helper->getHelper('FlashMessenger')->getMessages();
    	}
    	else{
    		$this->_redirect('/');
    	}
    }
}

